package utils;

import com.jme3.math.Matrix3f;

public class RotateMatrix {
	public static final Matrix3f getRotationX(double alpha) {
		Matrix3f rotMatX = new Matrix3f(
				1f,                      0f,                      0f,
				0f, (float) Math.cos(alpha), (float)-Math.sin(alpha),
				0f, (float) Math.sin(alpha), (float) Math.cos(alpha));
		return rotMatX;
	}
	
	public static final Matrix3f getRotationY(double alpha) {
		Matrix3f rotMatY = new Matrix3f(
				(float) Math.cos(alpha), 0f, (float) Math.sin(alpha),
				                    0f,  1f,                      0f,
				(float)-Math.sin(alpha), 0f, (float) Math.cos(alpha));
		return rotMatY;
	}
	
	public static final Matrix3f getRotationZ(double alpha) {
		Matrix3f rotMatZ = new Matrix3f(
				(float) Math.cos(alpha), (float)-Math.sin(alpha), 0f,
				(float) Math.sin(alpha), (float) Math.cos(alpha), 0f,
				                     0f,                      0f, 1f);
		return rotMatZ;
	}
}
